import request from "@/utils/request";

// 查询临床诊疗指南列表
export function listClinicHandbook(query) {
  return request({
    url: "/workstation/clinicHandbook/list",
    method: "get",
    params: query,
  });
}

// 查询临床诊疗指南详细
export function getClinicHandbook(id) {
  return request({
    url: "/workstation/clinicHandbook/" + id,
    method: "get",
  });
}

// 新增临床诊疗指南
export function addClinicHandbook(data) {
  return request({
    url: "/workstation/clinicHandbook",
    method: "post",
    data: data,
  });
}

// 修改临床诊疗指南
export function updateClinicHandbook(data) {
  return request({
    url: "/workstation/clinicHandbook",
    method: "put",
    data: data,
  });
}

// 删除临床诊疗指南
export function delClinicHandbook(id) {
  return request({
    url: "/workstation/clinicHandbook/" + id,
    method: "delete",
  });
}

// 下载接口
export function download(ossId) {
  return request({
    url: "/system/oss/download/" + ossId,
    method: "get",
    responseType: "blob",
  });
}
